#include<bits/stdc++.h>
using namespace std;

int main()
{
    int arr[6]={1,2,3,4,5,6};
    int even = 0;
    int odd = 0;
    for(int i = 0;i < 6;i++)
    {
        if(arr[i] % 2 == 0)
        {
            even++;
        }
        if(arr[i] % 2 != 0)
        {
            odd++;
        }
    }
    int m = 0;
    int n = 0;
    int arreven[even]={};
    int arrodd[odd]={};
    for(int i =0;i<6;i++)
    {
        if(arr[i] % 2 ==0)
        {
            arreven[m]=arr[i];
            m++;
        }
        else
        {
            arrodd[n]=arr[i];
            n++;
        }
    }
    for(int i = 0;i < odd;i++)
    {
        cout<<arrodd[i]<<"\t";
    }
    for(int j = 0;j < even;j++)
    {
        cout<<arreven[j]<<"\t";
    }
    return 0;
}